#! /usr/bin/env python
# -*- coding: utf-8 -*-

# *************************************************************
#     Filename @  pipe.py
#       Author @  Huoty
#  Create date @  2015-07-25 14:27:43
#  Description @  
# *************************************************************

from multiprocessing import Process, Pipe
import time

def subworker(connection):
    time.sleep(1)
    connection.send(["huoty", "k2010131080", 25])
    connection.close()

# Script starts from here

if __name__ == "__main__":
    conn1, conn2 = Pipe()
    p = Process(target=subworker, args=(conn2,))
    print "Recive:", conn1.recv()
    p.start()
    p.join()
    conn1.close()
